Carbon


ClearIntlResourceCache

Header: Script.h Carbon status: Supported

Clears the application’s international resources cache, which contains the resource ID numbers of the string-manipulation ('itl2') and tokens ('itl4') resources for the current script.

void ClearIntlResourceCache ();
DISCUSSION

At application launch, the script management system sets up an international resources cache for the application. The cache contains the resource ID numbers of the string-manipulation and tokens resources for all enabled scripts.

If you provide your own string manipulation or tokens resource to replace the default for a particular script, call ClearIntlResourceCache at launch to ensure that your supplied resource is used instead of the script system’s 'itl2' or 'itl4' resource.

The current default ID numbers for a script system’s 'itl2' and 'itl4' resources are stored in its script variables. You can read and modify these values with the GetScriptVariable and SetScriptVariable functions using the selectors smScriptSort (for the 'itl2' resource) and smScriptToken (for the 'itl4' resource). Before calling ClearIntlResourceCache, you should set the script’s default ID number to the ID of the resource that you are supplying.

If the international resources selection flag is TRUE, the ID numbers of your supplied resources must be in the system script range. Otherwise, the IDs must be in the range of the current script.

If you use the SetScriptVariable function to change the value of the 'itl2' or 'itl4' resource ID and then call ClearIntlResourceCache to flush the cache, be sure to restore the original resource ID before your application quits.

SPECIAL CONSIDERATIONS

ClearIntlResourceCache may move memory; your application should not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)